local boss_name = ""
if game.player.faction == "air" then boss_name = "Ariel, Queen of Air"
elseif game.player.faction == "earth" then boss_name = "Quaker, Master of Earth"
elseif game.player.faction == "fire" then boss_name = "Vargo, Tyrant of Fire"
elseif game.player.faction == "water" then boss_name = "Waldern, King of Water"
end

name = "Operation Orb Ownage"
desc = function(self, who)
	local desc = {}
	if who.faction == "mana" then desc[#desc+1] = "The mana elemental, before he was consumed by chaos, mentioned some orbs, perhaps they are key to unlocking the mana temple."
	else desc[#desc+1] = boss_name .. ", has asked you to collect all the elemental orbs to figure out how to unlock the mana temple." end
	if self:isCompleted("fire") then
		desc[#desc+1] = "#LIGHT_GREEN#* You have the Orb of Fire.#WHITE#"
	else
		desc[#desc+1] = "#SLATE#* You must obtain the Orb of Fire!#WHITE#"
	end
	if self:isCompleted("water") then
		desc[#desc+1] = "#LIGHT_GREEN#* You have the Orb of Water.#WHITE#"
	else
		desc[#desc+1] = "#SLATE#* You must obtain the Orb of Water!#WHITE#"
	end
	if self:isCompleted("earth") then
		desc[#desc+1] = "#LIGHT_GREEN#* You have the Orb of Earth.#WHITE#"
	else
		desc[#desc+1] = "#SLATE#* You must obtain the Orb of Earth!#WHITE#"
	end
	if self:isCompleted("air") then
		desc[#desc+1] = "#LIGHT_GREEN#* You have the Orb of Air.#WHITE#"
	else
		desc[#desc+1] = "#SLATE#* You must obtain the Orb of Air!#WHITE#"
	end
	return table.concat(desc, "\n")
end

on_status_change = function(self, who, status, sub)
	if sub then
		if self:isCompleted("fire") and self:isCompleted("water") and self:isCompleted("earth") and self:isCompleted("air") then
			who:setQuestStatus(self.id, engine.Quest.COMPLETED)
		end
	end
end
